package user

import (
	"chain_bridge_service/internal/pkg/core"
	"chain_bridge_service/internal/repository/mongodb"
	"chain_bridge_service/internal/repository/mongodb/user"
)

var _ Service = (*service)(nil)

type Service interface {
	i()

	Login(ctx core.Context, loginData *LoginData) (user *user.User, err error)
	ChangePassword(ctx core.Context, passwordData *PasswordData) (err error)
	List(ctx core.Context, pageIndex uint, pageSize uint) (userList []*user.User, err error)
	Count(ctx core.Context) (count int64, err error)
	ChangeStatus(ctx core.Context, userId string, status int) (err error)

	Create(ctx core.Context, createData *CreateData) (err error)
	Update(ctx core.Context, createData *CreateData) (err error)
}

type service struct {
	db mongodb.Repo
}

func New(db mongodb.Repo) Service {
	return &service{
		db: db,
	}
}

func (s *service) i() {}
